Use the Empty Node nodes to group nodes and to set property values of their child nodes. Empty Node nodes do not have a visual representation, or any functionality other than a transparent background and that they can act as a parent node to other nodes. Empty Node nodes do not have any properties specific only to them.
For example, use Empty Node nodes to:
An Empty Node is a node into which you can put any other node and has these properties:
Empty Node does not have inherent layout characteristics. Empty Node does not resize its child nodes, but places them to a position you specify. The default values of the Layout Height and Layout Width properties of an Empty Node are 0, but it stretches by default to take all the space its child nodes need.
You can use the Horizontal Alignment and Vertical Alignment properties to align the child nodes of an Empty Node only after you specify the Layout Height and Layout Width properties of that Empty Node.
To create an Empty Node node:
To set the appearance of 2D nodes:
To create an Empty Node 3D node using the API:
// Create an Empty Node 3D named Empty3D EmptyNode3DSharedPtr emptyNode = EmptyNode3D::create(domain, "Empty3D"); // Create and add a cube to the Empty Node 3D ModelSharedPtr cube = Model::createCube(domain, "Cube", 1.0f, KanziThemeOrange); emptyNode->addChild(cube);
For details, see the EmptyNode3D
class in the API reference.
To create an Empty Node 2D node using the API:
// Create an Empty Node 2D named Empty2D EmptyNode2DSharedPtr empty2D = EmptyNode2D::create(domain, "Empty2D"); // Create and add an Image to the Empty Node 2D ImageSharedPtr image = Image::create(domain, "Image"); image->setTextureResourceID(ResourceID("DefaultTexture")); empty2D->addChild(image);
For details, see the EmptyNode2D
class in the API reference.
For lists of the available property types and messages for the Empty Node nodes, see Empty node 2D and Empty node 3D.